VWG Fluid Details file Import
Introduction
The VWG Fluid Details import loads VWG fluid code → description mappings into Cloud SQL so the VWG enquiry description flow can show friendly names for fluid lines.
Applicable Manufacturers
- VWG (VWG group)
Cloud SQL table
- Database:
Cloud SQL for PostgreSQL - Table:
vwg_fluid_details
Fields (Cloud SQL columns)
| Column | Description | Datatype | Notes |
|---|---|---|---|
| fluid_code | Fluid code | VARCHAR(10) | Primary key and indexed |
| unit | Unit | VARCHAR(20) | Optional |
| description | Fluid description | VARCHAR(255) | Used as the fluid line name in enquiries |
| comments | Comments | TEXT | Optional |
File format
- Expected input filename (default):
ppso_conversion_codes.csv
CSV header fields used by the importer:
| CSV header | Cloud SQL column | Mandatory | Validation |
|---|---|---|---|
| Code | fluid_code | Yes | Required; row is skipped if missing |
| Unit | unit | No | Optional |
| Description | description | Yes | Required; row is skipped if missing |
| Comments | comments | No | Optional |
Row requirements:
- Code and Description must be present, otherwise the row is skipped.
Importing a file
Preparation
- Upload ppso_conversion_codes.csv into bucketName/importFilesDropPath.
Validation
Trigger validation by calling the importer endpoint with persist="false":
- POST /manufacturer/fluid-file-import
Payload example:
{
"bucketName": "fnp-imports-develop",
"importFilesDropPath": "vwg/",
"importFileName": "ppso_conversion_codes.csv",
"appDirectory":"importFiles/vwg/vehicle/",
"persist": "false",
"fnpProvider": "VWG",
"importType": "FLUIDS_PRICING"
}
| Key | Value |
|---|---|
| bucketName | Google Bucket name |
| importFilesDropPath | Import file drop location |
| appDirectory | App Directory |
| persist | false |
| fnpProvider | FNP manufacturer provider |
| importFileName | Import file name |
| importType | Fluids Pricing Type |
Importing
Trigger import by calling the endpoint:
- POST /manufacturer/fluid-file-import Payload example:
{
"bucketName": "fnp-imports-develop",
"importFilesDropPath": "vwg/",
"importFileName": "ppso_conversion_codes.csv",
"appDirectory":"importFiles/vwg/vehicle/",
"persist": "true",
"fnpProvider": "VWG",
"importType": "FLUIDS_PRICING"
}
| Key | Value |
|---|---|
| bucketName | Google Bucket name |
| importFilesDropPath | Import file drop location |
| appDirectory | App Directory |
| persist | true |
| fnpProvider | FNP manufacturer provider |
| importFileName | Import file name |
| importType | Fluids Pricing Type |
Import behaviour (implementation)
- In bucket mode, the file is downloaded locally to
<appDirectory>/<importFileName>before parsing (for the example payload above:importFiles/vwg/vehicle/ppso_conversion_codes.csv). - In persist mode, rows are upserted into vwg_fluid_details using conflict key fluid_code.
Testing
- Confirm Cloud SQL table
vwg_fluid_detailshas rows. - Confirm fluid lines in VWG enquiry descriptions show friendly names (where codes are present in the table).